1. Field of the Invention
The present invention relates to an open platform application field, and more particularly to a method and device for a proxy access of an open platform.
2. Description of Prior Art
In order to support a third party to develop third party application programs for fulfilling various application requirements, an open platform provides an application programming interface (API) for a third party application, and the open platform usually provides a software development kit (SDK) of the API for the third party application to download so that the third party may use the fast and convenient developments. The third party application developed by a developer exchanges data with the open platform by calling the SDK to provide plentiful terminal applications for a user. When the third party application for the open platform which requires an authentication is utilized, the user needs to input a username and a password, so as to call a functional interface of the open platform normally after the open platform has gone through authentication.
For example, microblog systems of some large websites provide particular open platforms, and the open platforms provide the API and SDKs for a third party software developer, and a vast number of microblog messages, relationships of fans, and hot topics occurring anywhere and anytime are provided through the API. An application developer of a mobile terminal can directly read and write the contents provided by the microblog systems through the API or using the SDK, so as to find out new applications of the microblog systems. Taking a client application at a client end using the microblog by a mobile phone for example, a user can share contents of pictorials, pictures or the like on a microblog open platform at anytime after the user inputs the username and password, which have been already pre-registered in the microblog by himself or herself, at the client end. However, a defect in implementing the scheme in this way is that the SDK is required to be embedded in the third party application to process registration and authentication logics. For the third party application which only utilizes a few functions of the open platform, such an implementation may have larger resource occupancy and a higher development cost. Furthermore, the user needs to input the username and password while utilizing the third party application, a security problem that the username and password are embezzled may occur.
The open platform has further a scheme without the registration and authentication in the third party application. In this scheme, the embedded SDK is not required in the third party application. The third party application sends a request of a uniform resource locator (URL) in a specific format to the platform through a browser. The URL includes particular data parameters. If the open platform requires the authentication and registration, then the user needs to input the username and password, which are acquired from the open platform, in a web page returned by the open platform to complete the request. Taking the open platform of Tencent microblog (http://open.t.qq.com/) for example, the third party application may send a request of URL in the specific format as follows to post a microblog item:
http://v.t.qq.com/share/share.php?title=mytitle&url=myurl&pic=mypic
Amongst, the string “mytitle” is a microblog content to be posted, and the string “myurl” is a link to be added to the content. The string “mypic” is a picture required to be attached. The third party application fills the content to be posted, link, and picture according to a practical situation. If it is under an unregistered state, then the user needs to input the username and password in the page returned by the platform and then posts after confirmation.
A drawback of the above-mentioned second implementation scheme is that since the URL format and the open platform interact and the URL attains a format limitation of the carried parameters, hence a local file cannot be uploaded and the file indicated by the parameters can only come from the internet source. Furthermore, the user is required to input the username and password in the third party application, and thus lead to a security problem that the username and password are embezzled may occur.